home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / hack / 3_1 / win / x11 / install.x11 < prev    next >
Encoding:
Text File  |  1993-01-25  |  5.7 KB  |  110 lines

  1.  
  2. This is a first cut at an X11 window port for NetHack.  X11 offers enormous
  3. potential for NetHack, little of which is realized here.  If you have ideas
  4. and extra time, feel free to send in improvements!
  5.  
  6. There are no explicit UNIX dependencies in this code, but it is only
  7. known to work under UNIX, using X11R4 or X11R5.  Other X11R4+ platforms
  8. may work as well, with some tweaking likely.  Follow WIN* in
  9. sys/unix/Makefile.src for compilation hints.
  10.  
  11. The reason this uses the Athena widget set is that the Athena widgets come
  12. free from MIT (like X11).  Unfortunately, the companies that resell X11
  13. (value subtracted er, added software; yea, yea, that's the ticket) usually
  14. discourage its use by either omitting the set or putting it on the
  15. "unsupported" portion of their tape.  If you do not have the Athena
  16. widgets, you may obtain them via anonymous ftp from export.lcs.mit.edu.
  17.  
  18. To use this code, define X11_GRAPHICS in include/config.h.  Add $(WINX11SRC),
  19. $(WINX11OBJ), and $(WINX11LIB) to WINSRC, WINOBJ, and WINLIB respectively
  20. in src/Makefile.  This will give you an executable supporting both X11 and
  21. tty windowing.
  22.  
  23. If you want special graphics symbols, you will also need to install one
  24. or both of the included X11 fonts and use the symbol mappings found in
  25. nethack.rc.  The fonts are found in nh10.bdf and ibm.bdf.  You first need
  26. to convert the bdf files to whatever form your X11 server recognizes
  27. (usually using a command called bdftosnf, or on Ultrix systems, bdftopcf).
  28. Then run mkfontdir on the directory containing your font files (you might
  29. want to copy them to GAMEDIR, from the top Makefile, after you've done
  30. "make install").  If these commands aren't familiar, talk to your local
  31. X11 guru and read the man pages.  Finally, add that directory to your
  32. font search path (e.g. xset fp+ GAMEDIR, setting GAMEDIR to the value of
  33. GAMEDIR in the top Makefile).  Alternatively, you (assuming you are a
  34. system administrator) can install the fonts in your standard X11 font
  35. directory.  If you do not install the fonts in the standard X11 font
  36. directory, all persons playing nethack must add that "xset fp+" command
  37. to their .xinitrc file, or whatever file they execute when starting X11.
  38. Adding the "xset" command to the nethack.sh is also an alternative, though
  39. it may clutter your X11 font search path after playing several games, so
  40. this method is not recommended.  See the note below for the alternative
  41. installation procedure for Sun's OpenWindows.
  42.  
  43. If your X11 include files and libraries are not installed in a standard
  44. place (i.e. /usr/include/X11 and /usr/lib respectively) you will need to
  45. prepend an appropriate -I<idirectory> parameter to CFLAGS and a
  46. -L<ldirectory> parameter to LFLAGS, setting <?directory> to the place to
  47. find the include and library files for X11.
  48.  
  49. Finally, you should also install the NetHack.ad file in the normal X11
  50. applications defaults directory.  Alternatively, each person may append
  51. the contents of this file to their .Xdefaults file.  A second
  52. alternative is copy NetHack.ad to GAMEDIR (from the top Makefile) and
  53. add a line to nethack.sh specifying this additional applications
  54. defaults directory:
  55.     XAPPLRESDIR=$HACKDIR; export XAPPLRESDIR
  56.  
  57. Two icon suggestions to the window manager are supported:  nh72 and nh56.
  58. Data for them comes from source files nh72icon and nh56icon and they are
  59. compiled into the program via #include in winX.c.  Selection between them
  60. is controlled by the "icon" resource in NetHack.ad; the default is nh72.
  61.  
  62. Sorry, an Imakefile is not included.  Unlike many X11 programs, X11
  63. support is only a small, optional, part of nethack, and the Makefile is
  64. needed for systems that don't use X11.
  65.  
  66. Notes for Sun's OpenWindows 3.x (2.x will not work):
  67.     1.    Define OPENWINBUG in include/unixconf.h.  Add -I/usr/openwin/include
  68.     to CFLAGS, -L/usr/openwin/lib to LFLAGS, and -lm to WINX11LIB in
  69.     src/Makefile.  (Naturally, if your OpenWindows is installed
  70.     elsewhere, adapt the two openwin paths.)  This will allow you
  71.     to create a game executable.
  72.  
  73.     2.    Run the fonts through convertfont and run bldfamily on the directory.
  74.     The environment variable FONTPATH must include the directory the fonts
  75.     are in when NetHack is run.  For a personal installation, setting the
  76.     variable in your .profile or .login is the simplest thing.  For a
  77.     multi-user installation, add the lines
  78.         FONTPATH=$FONTPATH:$HACKDIR/fonts
  79.         export FONTPATH
  80.     near the top of sys/unix/nethack.sh (before installation), and put
  81.     the fonts and associated files in the "fonts" subdirectory of your
  82.     GAMEDIR from the top Makefile (after installation via 'make install').
  83.  
  84.     3.  Something must still be done with the NetHack.ad file.  All three
  85.     of the possibilities mentioned for standard X11 should work, but
  86.     it may be simplest to use the second or third, paralleling your
  87.     FONTPATH choice.
  88.  
  89.  
  90. File                Description
  91. ---------    ---------------------------------------------------------------
  92. nethack.rc    - A sample configuration file for fonts nh10 and ibm.
  93. nh10.bdf    - A modified version of the 10x20 standard font.
  94. ibm.bdf        - A modified version of one of the ibm (8x14) nethack font.
  95.           Must be used in conjunction with NetHack.ad or nethack.rc.
  96. nh32icon    - A 32x32 icon bitmap for use with window managers.
  97. nh56icon    - A 56x56 icon bitmap for use with window managers.
  98. nh72icon    - A 72x72 icon bitmap for use with window managers.
  99. NetHack.ad    - A sample .Xdefaults for a color screen.
  100. ../../include/Window.h
  101. ../../include/WindowP.h
  102. Window.c    - A bare-bones widget that has 16 colors and a drawing canvas.
  103. ../../include/winX.h
  104.         - Defines for the X window-port.
  105. win*.c        - Code for the X window-port
  106. dialogs.c    - A better dialog widget.  Original code (modified slightly
  107.           by Dean Luick) distributed under the X copyright by Tim
  108.           Theisen.  This is from his Ghostview program (which is under
  109.           the GNU public license, v2 or higher).
  110.